<%--
  Created by IntelliJ IDEA.
  User: 14258
  Date: 2020/9/4
  Time: 1:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
    <body>
    <%
        String text ="";
        Cookie[] cookies = request.getCookies();
        if (cookies != null){
            for (Cookie cookie:cookies) {
                if (cookie.getName().equals("text")){
                    text = cookie.getValue();
                    break;
                }
            }
            request.setAttribute("text",text);
        }
    %>
        请写下你的评论：
        <form method="post" action="/comment">
            <input type="text" size="40" name="text" value=${text} >
            <input type="submit">
        </form>
    </body>
</html>
